package cn.ecut.services;

import cn.ecut.dao.UserDao;
import cn.ecut.model.User;

import java.util.List;
import java.util.Objects;

public class Userservices {
    private  UserDao userDao=new UserDao();
    public User CheckLogin(User user) {
        List<User> list=userDao.CheckLogin(user);
        if(Objects.nonNull(list)&&list.size()>0)
        {
            return list.get(0);
        }
        return null;
    }
    public boolean SaveUser(User user){
        return userDao.SaveUser(user);
    }
}